<?php

namespace app\controller;

class IndexController
{
    public function index(): string
    {
        return 'hello';
    }

    public function json(): \support\Response
    {
        return json(['code' => 0, 'msg' => 'success']);
    }

    public function postJson(): \support\Response
    {
        return json(['code' => 0, 'msg' => 'success', 'data' => request()->post('name')]);
    }
}
